package com.mall.interface1.api;

import com.mall.domain.SmsCoupon;
import com.mall.domain.SmsCouponProductCategoryRelation;
import com.mall.domain.SmsCouponProductRelation;

import java.util.List;

public interface SmsCouponApi {

    //存入优惠券表并返回优惠券id
    Long addCoupon(SmsCoupon smsCoupon);

    void addScpcr(SmsCouponProductCategoryRelation smsCouponProductCategoryRelation);

    void addScpr(SmsCouponProductRelation smsCouponProductRelation);

    void deleteCouponById(Long id);

    void deletescpcr(Long id);

    void deletescpr(Long id);

    //根据条件分页查询出优惠券列表
    List<SmsCoupon> list(String name, Integer pageNum, Integer pageSize, Integer type);

    //查询符合条件总记录条数
    Integer count(String name, Integer pageNum, Integer pageSize, Integer type);

    //修改优惠券表
    void update(Long id, SmsCoupon smsCoupon);

    //修改优惠券相关表
    void updateScpcr(Long id, SmsCouponProductCategoryRelation smsCouponProductCategoryRelation);

    void updateScpr(Long id, SmsCouponProductRelation smsCouponProductRelation);

    //获取单个优惠券的详细信息
    SmsCoupon findById(Long id);

    //获取单个优惠券的相关信息1
    List<SmsCouponProductCategoryRelation> findScpcr(Long id);

    //获取单个优惠券的相关信息2
    List<SmsCouponProductRelation> findScpr(Long id);
}
